package AS3
{
	import flash.display.DisplayObject;
	import flash.display.Sprite;
	
	public class StageAndRoot extends Sprite
	{
		public function StageAndRoot()
		{
			super();
			trace(stage.numChildren);
			this.stage.addChild(new Sprite());
			this.stage.addChild(new Sprite());
			trace(stage.numChildren);
			
			
			this.addChild(new Sprite());
			this.addChild(new Sprite());
			
			trace(stage.numChildren);
			trace(this.numChildren);
			var obj:StageAndRoot = this.root as StageAndRoot;
			var dob:DisplayObject = new DisplayObject();
			for(var obj1:Object in obj) {
				trace(obj1);
			}
		}
	}
}